﻿using System.Runtime.InteropServices;

namespace VisionCloud.Utility.Security
{
    /// <summary>
    /// 对称加密
    /// </summary>
    public class AesHelper
    {
        [DllImport("aes.dll", EntryPoint = "encryptAES256", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
        public static extern string Encrypt(string text, string key);

        [DllImport("aes.dll", EntryPoint = "decryptAES256", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)]
        public static extern string Decrypt(string text, string key);
    }
}